package com.mengrv.springbootdemo.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/")
public class HomeController {

    @RequestMapping(value = "/", method = RequestMethod.GET)
    String welcome(@RequestParam(value = "userName", required = false) String userName) {
        return "<h1 style='margin: 150px;text-align:center'>服务已经启动！</h1>";
    }

}
